import React, { useState, useEffect } from 'react';
import {get} from "../../utils/get";
import ListUI from "./ListUI";
const LikeList = (props) => {
    const [data,setData]= useState([])
    useEffect(  () => {
        let isMounted =true;
        get('/share/board/likeCount').then(res => {
           if(isMounted&&res.data.code===0)
            setData(res.data.data)

        })
        return ()=>{
            isMounted=false;
        }
    }, [])

    return (
        <ListUI data={data} type={0}></ListUI>
    )
}
export default LikeList
